/*******************************************************************************
  * @file                   MOTOR.h
  * @Author:                MQjehovah                 mail:MQjehovah@hotmail.com
  * @version                1.0.0
  * @date                   2017.5.9
  * @brief                  
  ******************************************************************************
  * @attention
*******************************************************************************/
#ifndef _MOTOR_H
#define _MOTOR_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_conf.h"
#include "TIMER.h"
/* Definition ----------------------------------------------------------------*/
#define DIR_PORT     GPIOB
#define DIR_PIN      GPIO_Pin_8

#define DIR_P        GPIO_SetBits(DIR_PORT,DIR_PIN)   //正向
#define DIR_N        GPIO_ResetBits(DIR_PORT,DIR_PIN) //反向

typedef struct
{
	GPIO_TypeDef * PORT;
	uint16_t GPIO_Pin;
}GPIO_DEV;

typedef struct
{
	GPIO_DEV * gpio_dev;
	
	
}MOTOR_DEV;


/* Exported Functions --------------------------------------------------------*/
void MOTOR_init(void);
void MOTOR_Set_Speed(u16 speed);
void MOTOR_Move(u8 dir,u16 speed);
/*********************************END OF FILE**********************************/
#endif
